#ifndef __EI_MAI_SMART_PNV_H__
#define __EI_MAI_SMART_PNV_H__

#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif

typedef struct eiMADP_SMART_PNV_RESULT_S {
	EI_S32 s32Box[4];
	EI_FLOAT  f32Score;
	EI_S32 s32BoxSmooth[4];
	EI_S32 s32Id;
	EI_S32 s32TkNum;
	EI_S32 s32Orientation;
	EI_DOUBLE d32TimesTamp;
	EI_S32 s32Clolor;
	EI_S32 s32Type;
} EI_MADP_SMART_PNV_RESULT_S;

// typedef struct eiNNA_PNV_OUT_S{
//      EI_NNA_PNV_S cars;
//      EI_NNA_PNV_S cycles;
//      EI_NNA_PNV_S persons;
// } EI_NNA_PNV_OUT_S;//当三种类型去做
typedef struct  eiMADP_SMART_CAR_PNV_RESULT_S {
	EI_U32 u32Num;
	EI_MADP_SMART_PNV_RESULT_S stPNVsRect[DEFAULT_NNA_PNV_DET_CONFIG_MAX_TRACK_CNT];
} EI_MADP_SMART_CAR_PNV_RESULTS_S;//机动车

typedef struct eiMADP_SMART_CYCLES_PNV_RESULT_S {
	EI_U32 u32Num;
	EI_MADP_SMART_PNV_RESULT_S stPNVsRect[DEFAULT_NNA_PNV_DET_CONFIG_MAX_TRACK_CNT];
} EI_MADP_SMART_CYCLES_PNV_RESULTS_S;//非机动车

typedef struct eiMADP_SMART_PERSON_PNV_RESULT_S {
	EI_U32 u32Num;
	EI_MADP_SMART_PNV_RESULT_S stPNVsRect[DEFAULT_NNA_PNV_DET_CONFIG_MAX_TRACK_CNT];
} EI_MADP_SMART_PERSON_PNV_RESULTS_S;//人

typedef struct eiMADP_SMART_PNV_RESULTS_S {
	EI_MADP_SMART_CAR_PNV_RESULTS_S stCarPnv;
	EI_MADP_SMART_CYCLES_PNV_RESULTS_S stCyclesPnv;
	EI_MADP_SMART_PERSON_PNV_RESULTS_S stPersonPnv;

	EI_U32 u32FrameWidth;
	EI_U32 u32FrameHeight;
	EI_S32 s32FrameId;

	//for nna
	EI_U32 NnaHandle;
	EI_NNA_DST_PNVS_RESULRS_S stNnaResult;
} EI_MADP_SMART_PNV_RESULTS_S;


typedef struct eiMADP_SMART_PNV_VENC_DATA_S {
	EI_VOID *pVStreamData;
	EI_U8 *pu8Addr;
	EI_U32 au32Len;
} EI_MADP_SMART_PNV_VENC_DATA_S;

typedef struct eiMADP_SMART_PNV_CAP_RESULTS_S {
	EI_MADP_SMART_PNV_RESULTS_S *pstPnvResult;
	// cap frame image
	EI_MADP_SMART_FRAME_S *pstSmartFrame;
} EI_MADP_SMART_PNV_CAP_RESULTS_S;

typedef struct eiMADP_SMART_PNV_VENC_RESULT_S {
	EI_MADP_SMART_PNV_CAP_RESULTS_S *pstSmartCapResults;

	EI_S32 s32FrameId;
	EI_U64 u64Timestamp;
} EI_MADP_SMART_PNV_VENC_RESULT_S;


typedef struct eiMADP_SMART_PNV_SNAP_RESULT_S {
	EI_MADP_SMART_PNV_VENC_RESULT_S *pstPnvVencResultData;
	EI_MADP_SMART_PNV_VENC_DATA_S *pstBgVencData;
} EI_MADP_SMART_PNV_SNAP_RESULT_S;

//用户回调接收识别结果
typedef EI_S32 (*EI_MADP_SMART_PNV_DATA_CB)
	(EI_HANDLE hPnvCap, EI_MADP_SMART_FRAME_S *pstSmartFrame,
	EI_MADP_SMART_PNV_RESULTS_S *pstDetResults, EI_VOID *pPrivData);

//用户回调接收抓拍
typedef EI_S32 (*EI_MADP_SMART_PNV_SnapDataCB)(EI_HANDLE hPnvCap,
	EI_MADP_SMART_PNV_SNAP_RESULT_S *pstSmartPnvSnapResults, EI_VOID *pPrivData);

typedef struct eiMADP_SMART_PNV_CFG_S {
	EI_BOOL bPnvEnable;
	EI_BOOL bPnvDrawBoxEnable;//画框开关
	EI_S32 s32CapMode;//抓拍模式
	EI_S32 s32CapInterval;//抓拍时间戳
	EI_S32 s32CapJpegQuality;
	EI_U32 u32FrameWidth;
	EI_U32 u32FrameHeight;

	EI_S32 s32Sensitive;
	EI_MADP_SMART_PNV_SnapDataCB pfnCapDataCB;
	EI_MADP_SMART_PNV_DATA_CB pfnDataCB;
	EI_VOID *pPrivateData;
} EI_MADP_SMART_PNV_CFG_S;

/** the attribute of smart mbgs cap*/
typedef struct eiMADP_SMART_PNV_ATTR_S {
	/* init attr start*/
	EI_HANDLE Vproc;
	EI_HANDLE Vport;
	EI_HANDLE VencChn;
	EI_HANDLE Det;

	EI_MADP_SMART_PNV_CFG_S smartPnvCfg;
	EI_NNA_PNV_CONFIG_S stConfig;
} EI_MADP_SMART_PNV_ATTR_S;

#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif

#endif /* __EI_MAI_SMART_CAR_H__ */

